All Questions
Tagged with clean-architecturedesign-patterns
12 questions
3votes
2answers
570views
What value does the mediator pattern add beyond dependency injection?
Does the mediator pattern add any value beyond dependency injection? I am encountering the mediator pattern for the first time in context of this sample application, which is meant to demonstrate how ...
-3votes
1answer
268views
How should I architect a cricket scoring app?
Cricket scoring is complex and I want to build an app in part to practice good design principles/patterns and develop a clean solution. A few high level classes I have in mind are: Match | Innings | ...
-1votes
2answers
2kviews
Clean Architecture, good approaches to avoid hard-coding the creation of entities on the Use Case
I have an Use Case that has an UseCaseInput (which is a parameter object of the use case) and an UseCaseOutput which is the output object, the UseCaseInput has lots of parameters in which will be used ...
3votes
2answers
207views
Checking the user in almost all use cases
I have a web application that has Users that belong to Companies. A User can only belong to 1 Company at a time and they can manage their own company information. I'm using java spring and I'm ...
1vote
1answer
711views
How do I implement a domain entity behaviour that depends on some external infrastructure?
I am in the process of developing some software using CQRS, ES and DDD. A part of the system is writing services for controlling devices and collecting data from them. Consider a "Start" ...
-1votes
3answers
163views
Chain of responsibility look alike but choose handler at runtime
Currently I have an structure of PopUps and I've been thinking to use Chain of Responsibility pattern, but the difference is a popup can back to previous one PopUp and also can go to any other PopUp. ...
1vote
1answer
133views
Proxy / Decorator Design pattern scalability to a lot of methods
I'm trying to solve a common problem of logging each method that calls 3rd party operation and I don't understand how to scale it up. Current implementation: public class ElasticsearchClient { ...
1vote
0answers
400views
Clean architecture and state pattern
I am working in an GUI application that would work as follows: It will retrieve and save data from any of the following sources: A "Cloud Library": This library would get and save data to a cloud. ...
-1votes
1answer
240views
Designing command and factory pattern with large conditions
I working on a project requiring quite a lot handlers to handle requests. In general, i'm comunicating with a communication card, receiving requests from any source (User Interface, Server it doesn't ...
8votes
2answers
11kviews
Doesn't repository pattern in clean architecture violate Dependency inversion principle?
From what I have read and seen clean architecture assumes that you have some entities which know nothing about persistence though at the same layer as they reside there might be an interface which has ...
49votes
3answers
9kviews
Using a "Pass-through (God) Service" is bad, right? [duplicate]
My team has developed a new service layer in our application. They created a bunch of services that implement their interfaces (E.g., ICustomerService, IUserService, etc). That's pretty good so far. ...
6votes
3answers
9kviews
Clean architecture, CQRS, and authentication?
I'm working on implementing my first clean architecture and CQRS application, I've stumbled across a bit of logic that's leaving me a bit stumped. I'm working on integrating authorization and ...